
testsrc = $(wildcard ./*.c)
testobj = $(patsubst %.c, %.o, $(testsrc))
CFLAGS += -lcmocka

CC = gcc
all: ex_mock

ex_mock: $(testobj)
	$(CC) $(testobj) -o $@ $(CFLAGS)

%.o: %.c
	$(CC) -c $< -o $@

.PHONY: clean  
clean:  
	rm -rf $(testobj) ex_mock
